package com.mall.b2c.domain.intergral;

import java.util.Date;

import javax.persistence.*;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.mall.b2c.domain.delivery.DeliveryMethodDomain;
import com.mall.b2c.domain.member.MemberDomain;
import com.mall.b2c.domain.store.StoreDomain;
import com.mall.b2c.enums.IntergralOrderStatus;
import com.mall.common.domain.BaseEntity;
@Entity
@Table(name = "b2c_credit_shop_order")
public class ShopOrderDomain extends BaseEntity{
	@JsonIgnore  private MemberDomain member;
	@JsonIgnore  private ShopProductDomain product;
	@JsonIgnore  private StoreDomain store;
	private IntergralOrderStatus status;
	private Date sendDate;//fahuoshijian
	private String phone; //shouji
	private String address;//地址
	private String express;

	;//快递单号
	private int intergral;
	private DeliveryMethodDomain deliveryMethod;
	private int num;//数量
	private String name;//收货人
	private String orderNo;//订单编号

	public int getIntergral() {
		return intergral;
	}

	public void setIntergral(int intergral) {
		this.intergral = intergral;
	}

	public String getExpress() {
		return express;
	}

	public void setExpress(String express) {
		this.express = express;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	public DeliveryMethodDomain getDeliveryMethod() {
		return deliveryMethod;
	}

	public void setDeliveryMethod(DeliveryMethodDomain deliveryMethod) {
		this.deliveryMethod = deliveryMethod;
	}
	@OneToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "product_id")
	public ShopProductDomain getProduct() {
		return product;
	}

	public void setProduct(ShopProductDomain product) {
		this.product = product;
	}
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "store_id")
	public StoreDomain getStore() {
		return store;
	}

	public void setStore(StoreDomain store) {
		this.store = store;
	}

	public int getNum() {
		return num;
	}

	public void setNum(int num) {
		this.num = num;
	}

	public Date getSendDate() {
		return sendDate;
	}

	public void setSendDate(Date sendDate) {
		this.sendDate = sendDate;
	}

	public String getOrderNo() {
		return orderNo;
	}

	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
	}


	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "member_id")
	public MemberDomain getMember() {
		return member;
	}
	public void setMember(MemberDomain member) {
		this.member = member;
	}
	public IntergralOrderStatus getStatus() {
		return status;
	}
	public void setStatus(IntergralOrderStatus status) {
		this.status = status;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	
}	
